import store from '/@/store'
let layout = store.getters["config/layout"]
export const pageRoutes = [
    {
        path: '/login',
        component: () => import("/@/views/login/index.vue"),
        hidden: true,
    },
    {
        path: "/main",
        name: "layout",
        component: () => 
            import (`/@/components/layout/${[layout]}/index.vue`),
        meta: {
            title: "主页"
        },
        // children: [
        //     {
        //         path: '/test',
        //         name: "hello",
        //         component: () => import(`/@/components/HelloWorld.vue`),
        //         meta: {
        //             auth: true,
        //             title: "测试页"
        //         }
        //     }
        // ]
        hidden: true,
    },
    {
        path: '/vab',
        component: () => 
        import (`/@/components/layout/${[layout]}/index.vue`),
        redirect: 'noRedirect',
        name: 'Vab',
        alwaysShow: true,
        meta: { title: '组件', icon: 'box-open' },
        children: [
          {
            path: 'permissions',
            name: 'Permission',
            component: '',
            meta: {
              title: '角色权限',
              permissions: ['admin', 'editor'],
            },
          },
          {
            path: 'icon',
            component: '',
            redirect: 'noRedirect',
            name: 'Icon',
            meta: {
              title: '图标',
              permissions: ['admin'],
            },
            children: [
              {
                path: 'awesomeIcon',
                name: 'AwesomeIcon',
                component: '',
                meta: { title: '常规图标' },
              },
              {
                path: 'remixIcon',
                name: 'RemixIcon',
                component: '',
                meta: { title: '小清新图标' },
              },
              {
                path: 'colorfulIcon',
                name: 'ColorfulIcon',
                component: '',
                meta: { title: '多彩图标' },
              },
            ],
          },
          {
            path: 'table',
            component: '',
            name: 'Table',
            meta: {
              title: '表格',
              permissions: ['admin'],
            },
          },
          {
            path: 'map',
            component: '',
            name: 'Map',
            meta: {
              title: '地图',
              permissions: ['admin'],
            },
          },
    
          {
            path: 'webSocket',
            name: 'WebSocket',
            component: '',
            meta: { title: 'webSocket', permissions: ['admin'] },
          },
          {
            path: 'form',
            name: 'Form',
            component: '',
            meta: { title: '表单', permissions: ['admin'] },
          },
          {
            path: 'element',
            name: 'Element',
            component: '',
            meta: { title: '常用组件', permissions: ['admin'] },
          },
          {
            path: 'tree',
            name: 'Tree',
            component: '',
            meta: { title: '树', permissions: ['admin'] },
          },
          {
            path: 'card',
            name: 'Card',
            component: '',
            meta: { title: '卡片', permissions: ['admin'] },
          },
          {
            path: 'verify',
            name: 'Verify',
            component: '',
            meta: { title: '验证码', permissions: ['admin'] },
          },
          {
            path: 'menu1',
            component: '',
            name: 'Menu1',
            alwaysShow: true,
            meta: {
              title: '嵌套路由 1',
              permissions: ['admin'],
            },
            children: [
              {
                path: 'menu1-1',
                name: 'Menu1-1',
                alwaysShow: true,
                meta: { title: '嵌套路由 1-1' },
                component: '',
    
                children: [
                  {
                    path: 'menu1-1-1',
                    name: 'Menu1-1-1',
                    meta: { title: '嵌套路由 1-1-1' },
                    component: '',
                  },
                ],
              },
            ],
          },
          {
            path: 'magnifier',
            name: 'Magnifier',
            component: '',
            meta: { title: '放大镜', permissions: ['admin'] },
          },
          {
            path: 'loading',
            name: 'Loading',
            component: '',
            meta: { title: 'loading', permissions: ['admin'] },
          },
          {
            path: 'player',
            name: 'Player',
            component: '',
            meta: { title: '视频播放器', permissions: ['admin'] },
          },
          {
            path: 'markdownEditor',
            name: 'MarkdownEditor',
            component: '',
            meta: { title: 'markdown编辑器', permissions: ['admin'] },
          },
          {
            path: 'editor',
            name: 'Editor',
            component: '',
            meta: {
              title: '富文本编辑器',
              permissions: ['admin'],
              badge: 'New',
            },
          },
          {
            path: 'backToTop',
            name: 'BackToTop',
            component: '',
            meta: { title: '返回顶部', permissions: ['admin'] },
          },
          {
            path: 'lodash',
            name: 'Lodash',
            component: '',
            meta: { title: 'lodash', permissions: ['admin'] },
          },
          {
            path: 'smallComponents',
            name: 'SmallComponents',
            component: '',
            meta: { title: '小组件', permissions: ['admin'] },
          },
    
          {
            path: 'upload',
            name: 'Upload',
            component: '',
            meta: { title: '上传', permissions: ['admin'] },
          },
          {
            path: 'log',
            name: 'Log',
            component: '',
            meta: { title: '错误日志模拟', permissions: ['admin'] },
          },
          {
            path:
              'https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension',
            name: 'ExternalLink',
            meta: {
              title: '外链',
              target: '_blank',
              permissions: ['admin', 'editor'],
              badge: 'New',
            },
          },
          {
            path: 'more',
            name: 'More',
            component: '',
            meta: { title: '关于', permissions: ['admin'] },
          },
        ],
    },
]